package com.woorigil.social.domain.deal;

import java.util.ArrayList;
import java.util.List;

import com.woorigil.social.BaseObject;


public class DealViewList extends BaseObject {
	private String title;
	private List<Deal> deals;
	
	public DealViewList(String title, List<Deal> deals) {
		this.title = title;
		this.deals = deals;
	}
	
	public List<Deal> add(Deal deal) {
		if (deals == null) {
			deals = new ArrayList<Deal>();
		}
		deals.add(deal);
		return deals;
	}
	
	public int getSize() {
		if (deals == null) {
			return 0;
		}
		return deals.size();
	}

	public List<Deal> getDeals() {
		return deals;
	}

	public void setDeals(List<Deal> deals) {
		this.deals = deals;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
}
